public class Skeleton : Enemy
{
    public SkeletonGroundState GroundState { get; private set; }
    public SkeletonIdleState IdleState { get; private set; }
    public SkeletonMoveState MoveState { get; private set; }
    public SkeletonBattleState BattleState { get; private set; }
    public SkeletonAttackState AttackState { get; private set; }
    public SkeletonStunnedState StunnedState { get; private set; }
    public SkeletonDeadState DeadState { get; private set; }

    protected override void Awake()
    {
        base.Awake();
        GroundState = new(this, "idle");
        IdleState = new(this, "idle");
        MoveState = new(this, "move");
        BattleState = new(this, "move");
        AttackState = new(this, "attack");
        StunnedState = new(this, "stunned");
        DeadState = new(this, "dead");
    }

    private void Start()
    {
        StateMachine.Initialize(IdleState);
    }

    public override bool CanBeStunned()
    {
        if (canBeStunned)
        {
            StateMachine.ChangeTo(StunnedState);
            return true;
        }
        return false;
    }

    public override void Die()
    {
        StateMachine.ChangeTo(DeadState);
    }
}